package com.example.test.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.test.mapper.TestMapper;
import com.example.test.moudle.UserTest;
import com.example.test.service.ITestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ITestServiceImpl implements ITestService {
    @Autowired
    private TestMapper testMapper;
    @Override
    public List<?> list() {
       return testMapper.selectList(new LambdaQueryWrapper<>());
    }

    @Override
    public String addUser() {
        UserTest userTest = new UserTest();
        userTest.setContent("测试雪花算法");
        userTest.setTitle("测试");
        testMapper.insert(userTest);
        return "添加成功";
    }
}
